package com.example.demo.controller;


import com.example.demo.dao.BookDao;
import com.example.demo.domain.BookEnter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("books")
//@Service
public class Book {
    @Autowired
    private BookDao bookdao;

    @GetMapping
    public List<BookEnter> getbyid(){
        System.out.println(bookdao.selectList(null));
        return bookdao.selectList(null);
    }
}
